package com.hcbxwy.feign.service;

import com.hcbxwy.feign.config.HelloFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Hello Feign
 *
 * @author Daman
 * @since 2020/1/16 21:03
 */
@FeignClient(name = "github-client", url = "https://api.github.com", configuration = HelloFeignConfig.class)
public interface HelloFeignService {

    /**
     * 根据查询条件搜索github仓库
     *
     * @param queryStr 查询条件
     * @return {@link java.lang.String}
     * @author Daman
     * @since 2020/1/16 21:22
     */
    @GetMapping("/search/repositories")
    String searchRepo(@RequestParam("q") String queryStr);
}
